<!DOCTYPE html>
<html>
<head>
    
    <include file="Common/head"/>
    
    <link href="__CSS__/plugins/iCheck/custom.css" rel="stylesheet">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    
    <!-- Panel Other -->
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>{$title}</h5>
        </div>
        <div class="ibox-content">
            <div class="row row-lg">
                <div class="col-sm-12">
                    
                    <include file="Common/alert"/>
                    
                    <div class="clearfix" style="width:100%;">
                        <div class="bars pull-left">
                            <div class="btn-group hidden-xs" id="exampleTableEventsToolbar" role="group">
                                <button type="button" class="btn btn-outline btn-default" href="{:U('User/index')}" style="padding-bottom: 8px;padding-top: 8px;">
                                    <i class="glyphicon glyphicon-chevron-left" aria-hidden="true"></i>
                                </button>
                                <button class="btn btn-default btn-outline" type="button" name="refresh" title="刷新" href="__SELF__" style="padding-bottom: 8px;padding-top: 8px;">
                                    <i class="glyphicon glyphicon-repeat"></i>
                                </button>
                            </div>
                        </div>
                    </div>
    
                    <form method="post" action="{:U('addToGroup')}" class="form-horizontal">
    
                        <div class="hr-line-dashed"></div>
    
                        <div class="form-group">
                            <label class="col-sm-2 control-label">{$nickname} 所属的用户组列表</label>
                            <div class="col-sm-10">
                                <volist name="auth_groups" id="group">
                                    <div class="radio i-checks">
                                        <label>
                                            <input class="auth_groups" type="checkbox" value="{$group.id}" name="group_id[]">{$group.title}
                                        </label>
                                    </div>
                                </volist>
                            </div>
                        </div>
    
                        <script type="text/javascript">
                            $(function(){
                                var group = [{$user_groups}];
                                $('.auth_groups').each(function(){
                                    if( $.inArray( parseInt(this.value,10),group )>-1 ){
                                        $(this).prop('checked',true);
                                    }
                                });
                            });
                        </script>
                        <input type="hidden" name="notApi" value="1"/>
                        <input type="hidden" name="uid" value="{:I('uid')}">
                        <input type="hidden" name="batch" value="true">
        
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button class="btn btn-primary" type="submit">保存内容</button>
                                <button class="btn btn-white" type="submit" onclick="window.history.go(-1);">取消</button>
                            </div>
                        </div>
                    </form>
                </div>
                
            </div>
        </div>
    </div>
    <!-- End Panel Other -->
</div>
<include file="Common/footer"/>
<script src="__JS__/content.min.js?v=1.0.0"></script>
<script src="__JS__/plugins/iCheck/icheck.min.js"></script>
<script src="__JS__/plugins/summernote/summernote.min.js"></script>
<script src="__JS__/plugins/summernote/summernote-zh-CN.js"></script>

<script>
    $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
    $(document).ready(function(){$(".summernote").summernote({lang:"zh-CN"})});var edit=function(){$("#eg").addClass("no-padding");$(".click2edit").summernote({lang:"zh-CN",focus:true})};var save=function(){$("#eg").removeClass("no-padding");var aHTML=$(".click2edit").code();$(".click2edit").destroy()};
</script>
</body>
</html>
